// PasswordDialog.h

#ifndef __PASSWORDDIALOG_H
#define __PASSWORDDIALOG_H


#include "resource.h"

class CPasswordDialog: public CDialogImpl<CPasswordDialog>
{
	public:
	enum { IDD = IDD_DIALOG_PASSWORD};

	BEGIN_MSG_MAP(CPasswordDialog)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		COMMAND_ID_HANDLER(IDC_CHECK_PASSWORD_SHOW, OnShowPassword)		
	END_MSG_MAP()
  LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
  
  LRESULT OnShowPassword(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

  LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
	{
		_passwordControl.GetWindowText(Password);
		EndDialog(wID);
		return 0;
	}

  CEdit _passwordControl;
    
public:
  CString Password;
  
};

#endif
